<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of TipoCompraRepository
 *
 * @author felipe
 */
class App_Model_TipoCompraRepository {
    public function listarTodos(){
        $arrDbTipoCompra = App_Model_Db_TipoCompra::build()->getAdapter()->fetchAll(App_Model_Db_TipoCompra::build()->select());
        $arrTipoCompra = array();
        foreach($arrDbTipoCompra as $row) {
            $obTipoCompraMapper = new App_Model_TipoCompraMapper(new App_Model_TipoCompra());
            $arrTipoCompra[] = $obTipoCompraMapper->carregar($row)->getObModel();
        }
        return $arrTipoCompra;
    }
}
